
---
# - name: LOG to ELK
#   hosts: all
#   connection: network_cli
#   gather_facts: false

#   tasks:

#     - name: Set host logging with elk stack
#       cisco.ios.ios_logging_global:
#         config:
#           hosts:
#             - hostname: 192.168.1.98
#               transport:
#                 tcp:
#                   port: 5514
#         state: overridden

#     - name: save config
#       ios_command:
#         commands: wr


- name: Apply the provided configuration
  cisco.ios.ios_logging_global:
    config:
      hosts:
        - hostname: 192.168.1.98
          transport:
            tcp:
              port: 5514